import request from '@/utils/request'

/* 根据id查询供应商*/
export function selectSupplierById(data) {
  return request({
    url: '/erp/supplier/selectSupplierById/' + data,
    method: 'post'
  })
}

/* 列表分页*/
export function selectSupplierPage(data) {
  return request({
    url: '/erp/supplier/selectSupplierPage',
    method: 'post',
    data: data
  })
}

/* 新增*/
export function saveSupplier(data) {
  return request({
    url: '/erp/supplier/saveSupplier',
    method: 'post',
    data: data
  })
}

/* 修改*/
export function updateSupplierById(data) {
  return request({
    url: '/erp/supplier/updateSupplierById',
    method: 'post',
    data: data
  })
}

/* 删除*/
export function deleteSupplier(data) {
  return request({
    url: '/erp/supplier/deleteSupplier',
    method: 'post',
    data: data
  })
}

/* 查询所有供应商 */
export function selectSupplierByName(data) {
  return request({
    url: '/erp/supplier/selectSupplierByName',
    method: 'post',
    data: data
  })
}

/* 查询带索引的供应商信息 */
export function selectAllSupplierWithIndex(data) {
  return request({
    url: '/erp/supplier/selectAllSupplierWithIndex',
    method: 'post',
    data: data
  })
}
